package com.imelite.qyh.util;
import java.security.Key;
public class Encrypt {
	Key key = new Key()
	  {
	    private static final long serialVersionUID = 6457504852000340662L;

	    public byte[] getEncoded()
	    {
	      return new byte[] { 105, 13, 100, 103, -2, 33, -74, 93, -106, -54, 77, -111, 74, 71, -51, 27 };
	    }

	    public String getAlgorithm() {
	      return "AES";
	    }

	    public String getFormat() {
	      return "RAW";
	    }
	  };

	  public String enCode(String s)
	  {
	    return new DES().stringEnc(s, "metacrm");
	  }

	  public String deCode(String s)
	  {
	    return new DES().stringDec(s, "metacrm");
	  }

	  public static void main(String[] args)
	    throws Exception
	  {
	    Encrypt pe = new Encrypt();

	    String enS = pe.enCode("wjr");

	    String deS = pe.deCode(enS);
	    System.out.println(enS);
	    System.out.println(deS);
	  }
}
